package com.iot.core.model;

import java.util.List;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import org.springframework.data.cassandra.mapping.PrimaryKey;
import org.springframework.data.cassandra.mapping.Table;

import com.witsight.cassandra.model.BaseEntity;

/**   
 * 说明：Transaction
 * @Title: Transaction.java 
 * @Package com.witsight.cassandra.util.model 
 * @See: {@link BaseEntity}
 * Copyright: Copyright (c) 2017
 * Company:sany huax witsight team by product
 * @author: penght  
 * @date: 2017年9月21日 下午2:59:45 
 * @version: V1.0
 *
 */
@Table(value = "transaction")
public class Transaction extends BaseEntity<TransactionKey> {
	
	//serialVersionUID
	private static final long serialVersionUID = 5783306921808206356L;
	
	//primary key
	@PrimaryKey
	private TransactionKey id;
	
	//customerInitial
	private String customerInitial;
	
	//issuecatalogs
	private List<Integer> issueCatalogs;
	
	//note
	private String note;
	
	//repairsolutions
	private List<Integer> repairSolutions;
	
	//serialnumber
	private String serialNumber;
	
	@Override
	public TransactionKey getId() {
		return this.id;
	}

	public void setId(TransactionKey id) {
		this.id = id;
	}
	public String getCustomerInitial() {
		return customerInitial;
	}

	public void setCustomerInitial(String customerInitial) {
		this.customerInitial = customerInitial;
	}

	@Override
	public boolean equals(Object o) {
		if (this == o) {
			return true;
		}
		if (!(o instanceof Transaction)) {
			return false;
		}

		final Transaction transaction = (Transaction) o;
		return !(this.getId() != null ? !this.getId().equals(transaction.getId()) : transaction.getId() != null);
	}

	@Override
	public String toString() {
		return new ToStringBuilder(this, ToStringStyle.SIMPLE_STYLE)
				.append(super.toString())
				.append(this.id)
				.append(this.customerInitial)
				.append(this.issueCatalogs)
				.append(this.note)
				.append(this.repairSolutions)
				.append(this.serialNumber)
				.append(this.issueCatalogs)
				.toString();
	}
	public List<Integer> getIssueCatalogs() {
		return issueCatalogs;
	}

	public void setIssueCatalogs(List<Integer> issueCatalogs) {
		this.issueCatalogs = issueCatalogs;
	}

	public String getNote() {
		return note;
	}

	public void setNote(String note) {
		this.note = note;
	}

	public List<Integer> getRepairSolutions() {
		return repairSolutions;
	}

	public void setRepairSolutions(List<Integer> repairSolutions) {
		this.repairSolutions = repairSolutions;
	}

	public String getSerialNumber() {
		return serialNumber;
	}

	public void setSerialNumber(String serialNumber) {
		this.serialNumber = serialNumber;
	}

}
